from math import *
from string import *
from time import *


class Node:
    def __init__(self, id, image):
        self.__id = None  # passed in 
        self.__distList = [-1, -1, -1, -1]
        self.__dirList = [None, None, None, None]
        self.__visList = [False, False, False, False]
        self.__image = image  # passed in
        self.__sink = False
        self.__give = False

    def setID(self, id):
        self.__id = id

    def getID(self):
        return self.__id

    def setSink(self):
        self.__sink = True

    def getSink(self):
        return self.__sink

    def setGive(self):
        self.__give = True

    def getGive(self):
        return self.__Give

    def setDir(self, idx, next):
        self.__dirList[idx] = next

    def getDir(self, idx):
        return self.__dirList[idx]

    def setDist(self, idx, dist):
        self.__distList[idx] = dist

    def getDist(self, idx):
        return self.__distList[idx]

    def setVis(self, idx):
        self.__visList[idx] = True

    def getVis(self, idx):
        return self.__visList[idx]

    def setVisList(self, direction, visited):
        if direction == 'N':
            self.__visList[0] = visited
        elif direction == 'E':
            self.__visList[1] = visited
        elif direction == 'S':
            self.__visList[2] = visited
        elif direction == 'W':
            self.__visList[3] = visited

    def getVisList(self, direction):
        if direction == 'N':
            return self.__visList[0]
        elif direction == 'E':
            return self.__visList[1]
        elif direction == 'S':
            return self.__visList[2]
        elif direction == 'W':
            return self.__visList[3]

    
